<?xml version="1.0" ?>
<map height="6" tileheight="32" tileset="tiles/prison" tilewidth="64" width="10">
<layer z="0">
<tiles>
118 2 118 2 118 2 118 2 0 1    118 2 118 2 118 2 118 2 0 1    118 2 118 2 118 2 118 2 0 1    118 2 118 2 118 2 118 2 0 1    118 2 118 2 118 2 118 2 0 1    118 2 118 2 118 2 118 2 0 1    118 2 118 2 118 2 118 2 0 1    118 2 118 2 118 2 118 2 0 1    118 2 118 2 118 2 118 2 0 1    118 2 118 2 118 2 118 2 0 1    
118 2 118 2 118 2 118 2 0 1    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    
118 2 118 2 118 2 118 2 0 1    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    
118 2 118 2 118 2 118 2 0 1    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    
118 2 118 2 118 2 118 2 0 1    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    
118 2 118 2 118 2 118 2 0 1    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    118 2 118 2 118 2 118 2 0 1    118 2 118 2 118 2 118 2 0 1    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    0 2 0 2 0 2 0 2 0 0    
</tiles>

<!-- The very first event. -->
<if code="import party;partyManager=party.getPartyManager()" cond="not partyManager.hasRecord('prison_awakening')">
    <area tilex1="0" tilex2="10" tiley1="0" tiley2="6" script="locations/prison/events.py"/>
</if>


<!-- The bars are only there before Esana destroys them.
-->
<if code="import party;partyManager=party.getPartyManager()" cond="not partyManager.hasRecord('prison_met_esana')">

    <!-- This bars run prison_guard.py when interacted with. That script should let a
         guard enter this map, talk a little and then leave.
    -->
    <staticobject name="bars" isox="80" isoy="29" config="locations/prison/bars.xml" />
    <staticobject name="bars" isox="80" isoy="45" config="locations/prison/bars.xml" />
    <staticobject name="bars" isox="80" isoy="61" config="locations/prison/bars.xml" />
    <staticobject name="bars" isox="80" isoy="76" config="locations/prison/bars.xml" />

</if>

<!-- This bed runs prison_events.py when interacted with. It makes Esana appear
     when the time is right.
-->
<staticobject name="bed" isox="165" isoy="95" config="locations/prison/bed.xml" />

<!-- Create a door to the next map if we met Esana.
-->
<if code="import party;partyManager=party.getPartyManager()" cond="partyManager.hasRecord('prison_met_esana')">
    <area tilex1="1" tilex2="3" tiley1="5" tiley2="6">
import party
import annchienta
partyManager = party.getPartyManager()
partyManager.changeMap(&quot;locations/prison/floor2.xml&quot;, annchienta.Point( annchienta.TilePoint, 6, 2 ) )
    </area>
</if>

</layer>

<onload>
import annchienta
import battle
battleManager = battle.getBattleManager()
annchienta.getAudioManager().playMusic(&quot;music/prison.ogg&quot;)
annchienta.getVideoManager().setClearColor(0,0,0)
battleManager.enemiesInMap = []
battleManager.battleBackground = &quot;images/backgrounds/prison.png&quot;
</onload>

</map>
